%module functionalModule

%import "LibDL/global_typemaps.i"
%import "./LibDL/Tensor/Tensor.i"
%import "LibDL/TensorOptions/TensorOptions.i"

%{
#include "./LibDL/functional/functional.h"
#include "./LibDL/functional/functional_utils.h"
%}

%include "./LibDL/functional/functional.h"
%include "./LibDL/functional/functional_utils.h"

%template(loadTensor) functional::load<Tensor>;
%template(saveTensor) functional::save<Tensor>;

%template(get_indices_from_unique_float) functional::get_indices_from_unique_<float >;
%template(get_indices_from_unique_long) functional::get_indices_from_unique_<int64_t>;

%template(tensor) functional::tensor_<int8_t>;
%template(tensor) functional::tensor_<int>;
%template(tensor) functional::tensor_<int16_t>;
%template(tensor) functional::tensor_<int64_t>;
%template(tensor) functional::tensor_<float>;
%template(tensor) functional::tensor_<double>;

%template(tensor) functional::tensor_<std::vector<int8_t>>;
%template(tensor) functional::tensor_<std::vector<int>>;
%template(tensor) functional::tensor_<std::vector<int16_t>>;
%template(tensor) functional::tensor_<std::vector<int64_t>>;
%template(tensor) functional::tensor_<std::vector<float>>;
%template(tensor) functional::tensor_<std::vector<double>>;
